#pragma once
#include "base_type.h"
#include <vector>

namespace as
{
namespace net
{
class BasePacket
{
public:
	virtual int pack(const uint8 *in, uint8 *out, int insize)
	{
		memcpy(out, in, insize);
		return insize;
	}

	virtual bool unpack(const uint8 *in, uint8 *out, int outsize)
	{
		memcpy(out, in, outsize);
		return true;
	}
	
	virtual BasePacket *clone()
	{
		return new BasePacket();
	}
};




}
}